export const BaseUrl = "http://103.229.124.122:3000/api"
export const UploadUrl = "http://103.229.124.122:3000"


export const MENU_TYPE_ID = {
	Dishes4: 1, // 3菜1汤
	Noodle: 2 // 面条
}

export const DISH_TYPE_ID = {
	HeavyMeat: 1,
	HalfMeat: 2,
	Vegetable: 3,
	Soup: 4,
	Noodle: 5,
}

export function formatDishesScore(dishes) {
	return dishes.map(dish => {
		dish.score = scoreToFloat1(dish.score);
		return dish;
	})
}

export function scoreToFloat1(floatStr) {
	return parseFloat(parseFloat(floatStr).toFixed(1))
}